package ArrayList;

import java.util.ArrayList;

public class StudentDemo {
    public static void main(String[] args) {
        ArrayList<Student> stu = new ArrayList();
        stu.add(new Student("小红", 18, "女"));
        stu.add(new Student("小明", 17, "男"));
        stu.add(new Student("小刚", 19, "男"));
        int size = stu.size();

        for (int i = 0; i < size; i++) {
            Object o = stu.get(i);
            System.out.println(o.toString());

        }
    }
}
